import os,sys,glob
if __name__=='__main__':
    if len(sys.argv) < 3:
        print 'Usage:',sys.argv[0],'in','out'
        exit(2)
    inlist = glob.glob(sys.argv[1]+r"\*.jpg")
    for infile in inlist:
        path, name = os.path.split(infile)
        outfile = os.path.join(sys.argv[2],name)
        print infile,'->',outfile
        os.system(r'"d:\Users\sean\Documents\Visual Studio 2008\Projects\testijg\lib\test.exe" '+infile+' '+outfile)

